package org.lex.utils.text;

public class HexUtils {
	public static String dump(byte[] b) {
		return dump(b, 0, b.length);
	}

	public static String dump(byte[] b, int offset, int len) {
		StringBuilder buf = new StringBuilder();
		for (int i = offset, n = offset + len; i < n; i++)
			buf.append(Integer.toHexString(0xff & b[i])).append(' ');
		return buf.toString();
	}
}
